package main

import "fmt"

//test map iterator
func main() {
	// cities := make(map[string]string)
	// cities["1"] = "苏州"
	// cities["2"] = "北京"
	// cities["3"] = "上海"
	// for k, v := range cities {
	// 	fmt.Printf("k=%v v=%v\n", k, v)
	// }c

	//test iterator in nest map
	studentMap := make(map[string]map[string]string)
	fmt.Println(len(studentMap))
	studentMap["1"] = make(map[string]string)
	studentMap["1"]["name"] = "jhon"
	studentMap["1"]["sex"] = "male"
	studentMap["1"]["age"] = "22"
	studentMap["2"] = make(map[string]string)
	studentMap["2"]["name"] = "sara"
	studentMap["2"]["sex"] = "female"
	studentMap["2"]["age"] = "25"
	// fmt.Println(studentMap)
	// for _, v1 := range studentMap {
	// fmt.Printf("k1=%v\n", k1)
	// for k2, v2 := range v1 {
	// fmt.Println(k2, v2)
	// }
	// }
	fmt.Println(len(studentMap))

}
